import request from "../../http";
const supplierApi = {
  async getSupplierData(query) {
    return request({
      url: "/api/supplier/list",
      method: "get",
      params: query
    });
  },
  async delSupplierDatas(ids) {
    return request({
      url: "/api/supplier",
      method: "delete",
      data: ids
    });
  },
  async delSupplierData(id) {
    return request({
      url: `/api/supplier/${id}`,
      method: "delete"
    });
  },
  async postSupplierData(params) {
    return request({
      url: "/api/supplier",
      method: "post",
      data: params
    });
  },
  async editSupplierData(params) {
    return request({
      url: "/api/supplier",
      method: "post",
      data: params
    });
  },
  async getSupplierDetail(id) {
    return request({
      url: `/api/supplier/${id}`,
      method: "get"
    });
  },
  async getAllCity() {
    return request({
      url: "/api/city",
      method: "get"
    });
  },
  async querySupplierData(query) {
    return request({
      url: "/api/supplier/list",
      method: "get",
      params: query
    });
  },
  async approval(params) {
    return request({
      url: "/api/supplier/audit",
      method: "post",
      data: params
    });
  },
  async approvalStatus(id) {
    return request({
      url: `/api/supplier/audit?id=${id}`,
      method: "get"
    });
  }
};
export default supplierApi;
